package com.itheima.health.dao;

import com.itheima.health.pojo.Order;
import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author guoshijie
 * @Date 2022/6/8 16:46
 */
@Mapper
public interface OrderDao {
    //Map findById(@Param("id")Integer id);

    Integer findByCondition(@Param("memberId") Integer memberId, @Param("orderDate") Date orderDate, @Param("setmealId") Integer setmealId);

    void add(Order order);

    OrderSetting selectByOrderDate(Date orderDate);

    void editReservations(OrderSetting orderSetting);

    String findMemberName(@Param("id") Integer id);

    String findSetMealName(@Param("id")Integer id);

    Order findOrder(@Param("id")Integer id);

    Order findByOrder(@Param("memberId")Integer memberId, @Param("orderDate")Date orderDate, @Param("setmealId")Integer setMealId);

    List<Map<String, Object>> countSetMeal();

}
